package com.wsbombphoto.model;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class Marketing {

	private int idMarketing;
	private String name;
	private String dateMarketing;
	private String place;
	private float price;
	private String image;
	private String description;
	private double geoposition;
	private int idUser;

	public int getIdMarketing() {
		return idMarketing;
	}

	public void setIdMarketing(int idMarketing) {
		this.idMarketing = idMarketing;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDateMarketing() {
		return dateMarketing;
	}

	public void setDateMarketing(String dateMarketing) {
		this.dateMarketing = dateMarketing;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getGeoposition() {
		return geoposition;
	}

	public void setGeoposition(double geoposition) {
		this.geoposition = geoposition;
	}

	public int getIdUser() {
		return idUser;
	}

	public void setIdUser(int idUser) {
		this.idUser = idUser;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((dateMarketing == null) ? 0 : dateMarketing.hashCode());
		result = prime * result
				+ ((description == null) ? 0 : description.hashCode());
		long temp;
		temp = Double.doubleToLongBits(geoposition);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + idMarketing;
		result = prime * result + idUser;
		result = prime * result + ((image == null) ? 0 : image.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((place == null) ? 0 : place.hashCode());
		result = prime * result + Float.floatToIntBits(price);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Marketing other = (Marketing) obj;
		if (dateMarketing == null) {
			if (other.dateMarketing != null)
				return false;
		} else if (!dateMarketing.equals(other.dateMarketing))
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (Double.doubleToLongBits(geoposition) != Double
				.doubleToLongBits(other.geoposition))
			return false;
		if (idMarketing != other.idMarketing)
			return false;
		if (idUser != other.idUser)
			return false;
		if (image == null) {
			if (other.image != null)
				return false;
		} else if (!image.equals(other.image))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (place == null) {
			if (other.place != null)
				return false;
		} else if (!place.equals(other.place))
			return false;
		if (Float.floatToIntBits(price) != Float.floatToIntBits(other.price))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Marketing [idMarketing=" + idMarketing + ", name=" + name
				+ ", dateMarketing=" + dateMarketing + ", place=" + place
				+ ", price=" + price + ", image=" + image + ", description="
				+ description + ", geoposition=" + geoposition + ", idUser="
				+ idUser + "]";
	}

}
